<!DOCTYPE html>
<html>
  <head>
    <title>Malarkey</title>
    <meta charset="utf-8">
  </head>
  <body>
    <input type="text" class="malarkey">
    <script src="../dist/malarkey.min.js"></script>
    <script>
      var elem = document.querySelector('.malarkey');
      var attr = 'placeholder';
      var opts = {
        loop: true,
        getter: function(elem) {
          return elem.getAttribute(attr) || '';
        },
        setter: function(elem, val) {
          elem.setAttribute(attr, val);
        }
      };
      malarkey(elem, opts).type('Say hello')   .pause().delete()
                          .type('Wave goodbye').pause().delete();
    </script>
  </body>
</html>
